<!--
Copyright 2018 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Explore Sites Internals</title>
  <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css">
  <link rel="stylesheet" href="chrome://resources/css/throbber.css">
  <link rel="stylesheet" href="explore_sites_internals.css">

  <script src="chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js"></script>
  <script src="chrome://resources/js/assert.js"></script>
  <script src="chrome://resources/js/util.js"></script>
  <script src="explore_sites_internals.mojom-lite.js"></script>

  <script src="explore_sites_internals.js"></script>
</head>

<body>
  <div id="properties">
    <h3>Properties</h3>
    <div>
      <table class="details">
        <tr>
          <td>Server Endpoint</td>
          <td id="server-endpoint"></td>
        </tr>
        <tr>
          <td>Country Code</td>
          <td id="country-code"></td>
        </tr>
        <tr>
          <td>Chrome flags setup correctly</td>
          <td id="chrome-flags-setup"></td>
        </tr>
      </table>
    </div>
  </div>

  <div>
    <h3>Cached Catalog</h3>
    <div class="controls">
      <button id="clear-cached-catalog">Clear suggestions</button>
      <div id="clear-catalog-throbber" class="throbber" hidden></div>
    </div>
    <h3>Override Country Code</h3>
    <div class="controls">
      <button id="override-country-code">Override country:</button>
      <input class="expand" id="country-code-input" type="text">
      <div id="country-override-throbber" class="throbber" hidden></div>
    </div>
    <p>
      Country override is reset when Chrome shuts down. Press "Force fetch"
      to download the catalog for the new country.
    </p>
    <h3>Network Requests</h3>
    <div class="controls">
      <button id="force-network-request">Force fetch</button>
      <div id="network-request-throbber" class="throbber" hidden></div>
  </div>
</body>
</html>
